.class public Lcom/waiqin365/compons/c/a;
.super Ljava/lang/Object;


# static fields
.field private static h:Lcom/waiqin365/compons/c/a;


# instance fields
.field private a:Landroid/telephony/TelephonyManager;

.field private b:Landroid/telephony/gsm/GsmCellLocation;

.field private c:Landroid/telephony/cdma/CdmaCellLocation;

.field private d:I

.field private e:Ljava/lang/String;

.field private f:Ljava/lang/String;

.field private g:Ljava/util/ArrayList;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    new-instance v0, Lcom/waiqin365/compons/c/a;

    invoke-direct {v0}, Lcom/waiqin365/compons/c/a;-><init>()V

    sput-object v0, Lcom/waiqin365/compons/c/a;->h:Lcom/waiqin365/compons/c/a;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/compons/c/a;->g:Ljava/util/ArrayList;

    return-void
.end method

.method public static declared-synchronized a()Lcom/waiqin365/compons/c/a;
    .locals 2

    const-class v0, Lcom/waiqin365/compons/c/a;

    monitor-enter v0

    :try_start_0
    sget-object v1, Lcom/waiqin365/compons/c/a;->h:Lcom/waiqin365/compons/c/a;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v0

    return-object v1

    :catchall_0
    move-exception v1

    monitor-exit v0

    throw v1
.end method


# virtual methods
.method public a(Landroid/content/Context;)Ljava/util/ArrayList;
    .locals 6

    const/4 v1, 0x0

    const/4 v2, 0x0

    const/4 v5, 0x5

    const/4 v4, 0x3

    :try_start_0
    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->g:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    const-string/jumbo v0, "phone"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    iput-object v0, p0, Lcom/waiqin365/compons/c/a;->a:Landroid/telephony/TelephonyManager;

    const-string/jumbo v0, "eg968b"

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v3

    invoke-virtual {v3}, Lcom/fiberhome/gaea/client/c/b;->q()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-static {}, Landroid/telephony/CellLocation;->requestLocationUpdate()V

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->a:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getCellLocation()Landroid/telephony/CellLocation;

    move-result-object v0

    if-nez v0, :cond_1

    const-string/jumbo v0, "CELLID:celllocation \u4e3a\u7a7a\uff01"

    invoke-static {v0}, Lcom/fiberhome/gaea/client/d/d;->b(Ljava/lang/String;)V

    move-object v0, v1

    :goto_0
    return-object v0

    :cond_1
    instance-of v3, v0, Landroid/telephony/gsm/GsmCellLocation;

    if-eqz v3, :cond_a

    check-cast v0, Landroid/telephony/gsm/GsmCellLocation;

    iput-object v0, p0, Lcom/waiqin365/compons/c/a;->b:Landroid/telephony/gsm/GsmCellLocation;

    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->b:Landroid/telephony/gsm/GsmCellLocation;

    invoke-virtual {v0}, Landroid/telephony/gsm/GsmCellLocation;->getLac()I

    move-result v0

    iput v0, p0, Lcom/waiqin365/compons/c/a;->d:I

    const-string/jumbo v0, ""

    iget-object v3, p0, Lcom/waiqin365/compons/c/a;->a:Landroid/telephony/TelephonyManager;

    if-eqz v3, :cond_2

    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->a:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkOperator()Ljava/lang/String;

    move-result-object v0

    :cond_2
    if-eqz v0, :cond_4

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v3

    if-lt v3, v4, :cond_3

    const/4 v3, 0x0

    const/4 v4, 0x3

    invoke-virtual {v0, v3, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    iput-object v3, p0, Lcom/waiqin365/compons/c/a;->e:Ljava/lang/String;

    :cond_3
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v3

    if-lt v3, v5, :cond_4

    const/4 v3, 0x3

    const/4 v4, 0x5

    invoke-virtual {v0, v3, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/compons/c/a;->f:Ljava/lang/String;

    :cond_4
    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->e:Ljava/lang/String;

    if-eqz v0, :cond_5

    const-string/jumbo v0, ""

    iget-object v3, p0, Lcom/waiqin365/compons/c/a;->e:Ljava/lang/String;

    invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_6

    :cond_5
    const-string/jumbo v0, "460"

    iput-object v0, p0, Lcom/waiqin365/compons/c/a;->e:Ljava/lang/String;

    :cond_6
    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->f:Ljava/lang/String;

    if-eqz v0, :cond_7

    const-string/jumbo v0, ""

    iget-object v3, p0, Lcom/waiqin365/compons/c/a;->f:Ljava/lang/String;

    invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_8

    :cond_7
    const-string/jumbo v0, "phone"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSubscriberId()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_8

    const-string/jumbo v3, "460"

    invoke-virtual {v0, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_8

    const/4 v3, 0x3

    const/4 v4, 0x5

    invoke-virtual {v0, v3, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/compons/c/a;->f:Ljava/lang/String;

    :cond_8
    new-instance v0, Lcom/waiqin365/compons/c/b;

    invoke-direct {v0}, Lcom/waiqin365/compons/c/b;-><init>()V

    iget-object v3, p0, Lcom/waiqin365/compons/c/a;->b:Landroid/telephony/gsm/GsmCellLocation;

    invoke-virtual {v3}, Landroid/telephony/gsm/GsmCellLocation;->getCid()I

    move-result v3

    iput v3, v0, Lcom/waiqin365/compons/c/b;->a:I

    iget-object v3, p0, Lcom/waiqin365/compons/c/a;->e:Ljava/lang/String;

    iput-object v3, v0, Lcom/waiqin365/compons/c/b;->b:Ljava/lang/String;

    iget-object v3, p0, Lcom/waiqin365/compons/c/a;->f:Ljava/lang/String;

    iput-object v3, v0, Lcom/waiqin365/compons/c/b;->c:Ljava/lang/String;

    iget v3, p0, Lcom/waiqin365/compons/c/a;->d:I

    iput v3, v0, Lcom/waiqin365/compons/c/b;->d:I

    const-string/jumbo v3, "gsm"

    iput-object v3, v0, Lcom/waiqin365/compons/c/b;->e:Ljava/lang/String;

    iget-object v3, p0, Lcom/waiqin365/compons/c/a;->g:Ljava/util/ArrayList;

    invoke-virtual {v3, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    invoke-virtual {v0}, Lcom/waiqin365/compons/c/b;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/fiberhome/gaea/client/d/d;->b(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->a:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNeighboringCellInfo()Ljava/util/List;

    move-result-object v3

    if-eqz v3, :cond_9

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v4

    :goto_1
    if-ge v2, v4, :cond_9

    new-instance v5, Lcom/waiqin365/compons/c/b;

    invoke-direct {v5}, Lcom/waiqin365/compons/c/b;-><init>()V

    invoke-interface {v3, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/NeighboringCellInfo;

    invoke-virtual {v0}, Landroid/telephony/NeighboringCellInfo;->getCid()I

    move-result v0

    iput v0, v5, Lcom/waiqin365/compons/c/b;->a:I

    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->e:Ljava/lang/String;

    iput-object v0, v5, Lcom/waiqin365/compons/c/b;->b:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->f:Ljava/lang/String;

    iput-object v0, v5, Lcom/waiqin365/compons/c/b;->c:Ljava/lang/String;

    iget v0, p0, Lcom/waiqin365/compons/c/a;->d:I

    iput v0, v5, Lcom/waiqin365/compons/c/b;->d:I

    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->g:Ljava/util/ArrayList;

    invoke-virtual {v0, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    add-int/lit8 v0, v2, 0x1

    move v2, v0

    goto :goto_1

    :cond_9
    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->g:Ljava/util/ArrayList;

    goto/16 :goto_0

    :cond_a
    instance-of v2, v0, Landroid/telephony/cdma/CdmaCellLocation;

    if-eqz v2, :cond_b

    check-cast v0, Landroid/telephony/cdma/CdmaCellLocation;

    iput-object v0, p0, Lcom/waiqin365/compons/c/a;->c:Landroid/telephony/cdma/CdmaCellLocation;

    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->c:Landroid/telephony/cdma/CdmaCellLocation;

    invoke-virtual {v0}, Landroid/telephony/cdma/CdmaCellLocation;->getSystemId()I

    move-result v0

    iget-object v2, p0, Lcom/waiqin365/compons/c/a;->c:Landroid/telephony/cdma/CdmaCellLocation;

    invoke-virtual {v2}, Landroid/telephony/cdma/CdmaCellLocation;->getBaseStationId()I

    move-result v2

    iget-object v3, p0, Lcom/waiqin365/compons/c/a;->c:Landroid/telephony/cdma/CdmaCellLocation;

    invoke-virtual {v3}, Landroid/telephony/cdma/CdmaCellLocation;->getNetworkId()I

    move-result v3

    new-instance v4, Lcom/waiqin365/compons/c/b;

    invoke-direct {v4}, Lcom/waiqin365/compons/c/b;-><init>()V

    iput v2, v4, Lcom/waiqin365/compons/c/b;->a:I

    iput v3, v4, Lcom/waiqin365/compons/c/b;->d:I

    const-string/jumbo v2, "460"

    iput-object v2, p0, Lcom/waiqin365/compons/c/a;->e:Ljava/lang/String;

    iget-object v2, p0, Lcom/waiqin365/compons/c/a;->e:Ljava/lang/String;

    iput-object v2, v4, Lcom/waiqin365/compons/c/b;->b:Ljava/lang/String;

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, v4, Lcom/waiqin365/compons/c/b;->c:Ljava/lang/String;

    const-string/jumbo v0, "cdma"

    iput-object v0, v4, Lcom/waiqin365/compons/c/b;->e:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->g:Ljava/util/ArrayList;

    invoke-virtual {v0, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    invoke-virtual {v4}, Lcom/waiqin365/compons/c/b;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/fiberhome/gaea/client/d/d;->b(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->g:Ljava/util/ArrayList;

    goto/16 :goto_0

    :cond_b
    iget-object v0, p0, Lcom/waiqin365/compons/c/a;->g:Ljava/util/ArrayList;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto/16 :goto_0

    :catch_0
    move-exception v0

    move-object v0, v1

    goto/16 :goto_0
.end method
